/*
 * Traction.h
 *
 *  Created on: 6 mars 2011
 *      Author: Julien
 */

#ifndef TRACTION_H_
#define TRACTION_H_

#include <iostream>
#include <pthread.h>
#include <signal.h>

using namespace std;

class Rame;

class Traction {
private:
	Rame* rame;
	int vitesse;
	bool estDemarree;
	bool estActive;
	pthread_t thread;

public:
	Traction();
	void setRame(Rame* rame);
	static void * threadRame(void *);
	void avancer();
	void stopper();
	void accelerer();
	void seDeplacer();
	void ralentir();
	void demarrerThread();
	void arreterThread();
	int getVitesse() const;
	virtual ~Traction();
};

#endif /* TRACTION_H_ */
